package com.youkeyi.ddy.cloud.common.api.application.business.storage.vaccinum;

import com.youkeyi.ddy.cloud.common.api.application.business.storage.vaccinum.dto.BusinessVaccinumPlanListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.business.storage.vaccinum.param.BusinessVaccinumPlanCloudParam;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletResponse;

/**
 * 系统疫苗计划商品
 *
 * @author  liuxiawang
 * @Date 5/24/22 10:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"【BUSINESS】vaccinum plan management"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-BUSINESS", fallback = BusinessVaccinumPlanCloudServiceFallback.class)
@RequestMapping("/business/vaccinum/plan")
public interface BusinessVaccinumPlanCloudService {

    // 查询疫苗计划
    @ApiOperation(value = "Query Business Vaccinum Plan", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.storage.vaccinum.BusinessVaccinumPlanCloudService.plan")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = BusinessVaccinumPlanListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query Business Vaccinum Plan", dataType = "BusinessVaccinumPlanCloudParam", dataTypeClass = BusinessVaccinumPlanCloudParam.class),
    })
    @GetMapping
    public abstract BusinessVaccinumPlanListCloudDto plan(BusinessVaccinumPlanCloudParam param);


    // 导出疫苗计划
    @ApiOperation(value = "Export Business Vaccinum Plan XLS", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.storage.vaccinum.BusinessVaccinumPlanCloudService.exportXls")})
    @ApiResponse(code = 200, message = "data Property in Response Body")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Export Business Vaccinum Plan XLS", dataType = "BusinessVaccinumPlanCloudParam", dataTypeClass = BusinessVaccinumPlanCloudParam.class),
    })
    @GetMapping("/export/xls")
    public abstract void exportXls(HttpServletResponse response, BusinessVaccinumPlanCloudParam param);
}
